package com.sun.entity.users;

import com.sun.entity.BaseEntity;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;

/**
 * MP自动填充Handler
 *
 * @Author sun
 * @CreateTime 2025/9/2 02:15
 */

@Data
@Table(name = "role_permissions")
@Entity
@SQLDelete(sql = "update role_permissions set deleted = 1 where id = ?")
@IdClass(RolePermissionEntityPK.class)
public class RolePermission extends BaseEntity {
    @Id
    private Long roleId;
    @Id
    private Long permissionId;
}
